<?php 
	//---  获得post数据  ---
	$User = $_REQUEST['UserID'];
	//－－－  连接服务器  －－－
	$con = mysql_connect("127.0.0.1:3306","root","1qazse4");
	$DataName = 'ShareNavigation';
	if(!$con)
	{
		die('无法连接远程服务器: '.mysql_error);
	}
	//－－－  链接指定数据库  －－－
	mysql_query("SET NAMES UTF8");
	mysql_select_db($DataName,$con);
	$query = "SELECT * FROM UserTravel WHERE UserID = \"$User\" ORDER BY Time DESC";
	$result = mysql_query($query);
	if(!$result)
	{
		//---  查询出错   ----
		die('FALSE');
	}
	else 
	{
		echo '<body>' ;
		while($row = mysql_fetch_array($result))
  		{
 			echo '<OneTravel>';
			echo '<UUID>' .$row['UUID'] . '</UUID>' ;
			echo '<UserID>' .$row['UserID'].'</UserID>';
			echo '<Location>'.$row['Location'] .'</Location>';
			echo '<Time>' . $row['Time'] . '</Time>';
			echo '<TravelSignature>' .$row['TravelSignature'] .'</TravelSignature>';
 			echo '<Longitude>' . $row['Longitude'] . '</Longitude>';
			echo '<Latitude>' . $row['Latitude'] . '</Latitude>';
			echo '<HasImage>' ;
			if($row ['HasImage'] == TRUE)
			{
				echo 'TRUE';
			}	
			else 
			{
				echo 'FALSE';
			} 
			echo '</HasImage>';
			echo '</OneTravel>';
 		}
		echo '</body>'; 	
	}
	
	mysql_close($con);
?>